package com.xjgzinfo.usdp.service.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.Lob;
import java.io.Serializable;

/**
 * A DTO for the {@link com.xjgzinfo.usdp.domain.BladeVisualComponent} entity.
 */
@ApiModel(description = "可视化组件表")
public class BladeVisualComponentDTO implements Serializable {

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    /**
     * 组件名称
     */
    @ApiModelProperty(value = "组件名称")
    private String name;

    /**
     * 组件内容
     */
    @ApiModelProperty(value = "组件内容")
    @Lob
    private String content;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof BladeVisualComponentDTO)) {
            return false;
        }

        return id != null && id.equals(((BladeVisualComponentDTO) o).id);
    }

    @Override
    public int hashCode() {
        return 31;
    }

    // prettier-ignore
    @Override
    public String toString() {
        return "BladeVisualComponentDTO{" +
                "id=" + getId() +
                ", name='" + getName() + "'" +
                ", content='" + getContent() + "'" +
                "}";
    }
}
